From 6370cf3b8ea3858d0fbd4784e48ce0f4a2cc8a83 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 5 Feb 2002 22:50:31 +0000 Subject: [PATCH] Remove a (now) misleading comment. * gtk/gtkrc.c (gtk_rc_parse_file): Remove a (now) misleading comment. * gtk/tmpl/gtkrc.sgml: Update the description of RC file loading to match recent code changes. Also document font_name and engine. --- ChangeLog | 4 ++ ChangeLog.pre-2-0 | 4 ++ ChangeLog.pre-2-10 | 4 ++ ChangeLog.pre-2-2 | 4 ++ ChangeLog.pre-2-4 | 4 ++ ChangeLog.pre-2-6 | 4 ++ ChangeLog.pre-2-8 | 4 ++ docs/reference/ChangeLog | 5 +++ docs/reference/gtk/tmpl/gtkrc.sgml | 62 ++++++++++++++++++++++-------- gtk/gtkrc.c | 9 ++--- 10 files changed, 83 insertions(+), 21 deletions(-) diff --git a/ChangeLog b/ChangeLog index 91bb2e4ca5..07036b53e9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2002-02-05 Matthias Clasen + + * gtk/gtkrc.c (gtk_rc_parse_file): Remove a (now) misleading comment. + 2002-02-05 Federico Mena Quintero * gdk/gdkwindow.h: Do not #include . diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 91bb2e4ca5..07036b53e9 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,7 @@ +2002-02-05 Matthias Clasen + + * gtk/gtkrc.c (gtk_rc_parse_file): Remove a (now) misleading comment. + 2002-02-05 Federico Mena Quintero * gdk/gdkwindow.h: Do not #include . diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 91bb2e4ca5..07036b53e9 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,7 @@ +2002-02-05 Matthias Clasen + + * gtk/gtkrc.c (gtk_rc_parse_file): Remove a (now) misleading comment. + 2002-02-05 Federico Mena Quintero * gdk/gdkwindow.h: Do not #include . diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 91bb2e4ca5..07036b53e9 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,7 @@ +2002-02-05 Matthias Clasen + + * gtk/gtkrc.c (gtk_rc_parse_file): Remove a (now) misleading comment. + 2002-02-05 Federico Mena Quintero * gdk/gdkwindow.h: Do not #include . diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 91bb2e4ca5..07036b53e9 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,7 @@ +2002-02-05 Matthias Clasen + + * gtk/gtkrc.c (gtk_rc_parse_file): Remove a (now) misleading comment. + 2002-02-05 Federico Mena Quintero * gdk/gdkwindow.h: Do not #include . diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 91bb2e4ca5..07036b53e9 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,7 @@ +2002-02-05 Matthias Clasen + + * gtk/gtkrc.c (gtk_rc_parse_file): Remove a (now) misleading comment. + 2002-02-05 Federico Mena Quintero * gdk/gdkwindow.h: Do not #include . diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 91bb2e4ca5..07036b53e9 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,7 @@ +2002-02-05 Matthias Clasen + + * gtk/gtkrc.c (gtk_rc_parse_file): Remove a (now) misleading comment. + 2002-02-05 Federico Mena Quintero * gdk/gdkwindow.h: Do not #include . diff --git a/docs/reference/ChangeLog b/docs/reference/ChangeLog index c875badab7..34f211eb18 100644 --- a/docs/reference/ChangeLog +++ b/docs/reference/ChangeLog @@ -1,3 +1,8 @@ +2002-02-05 Matthias Clasen + + * gtk/tmpl/gtkrc.sgml: Update the description of RC file loading + to match recent code changes. Also document font_name and engine. + Tue Jan 29 23:41:31 2002 Owen Taylor * gtk/Makefile.am (content_files): Add x11.sgml. diff --git a/docs/reference/gtk/tmpl/gtkrc.sgml b/docs/reference/gtk/tmpl/gtkrc.sgml index 76c14a8cad..58596be833 100644 --- a/docs/reference/gtk/tmpl/gtkrc.sgml +++ b/docs/reference/gtk/tmpl/gtkrc.sgml @@ -33,16 +33,13 @@ Additionally, the GTK_RC_FILES environment variable can be set to a #G_SEARCHPATH_SEPARATOR_S-separated list of files in order to overwrite the set of default files at runtime. - -For each default file, in addition to the file itself, -GTK+ will look for a locale-specific file that will -be parsed before the main file. For instance, -if LANG is set to ja_JP.ujis, -when loading the default file ~/.gtkrc -then GTK+ looks for ~/.gtkrc.ja_JP.ujis, -~/.gtkrc.ja_JP, and -~/.gtkrc.ja, and parses all files that -it finds. + +For each RC file, in addition to the file itself, GTK+ will look for +a locale-specific file that will be parsed after the main file. +For instance, if LANG is set to ja_JP.ujis, +when loading the default file ~/.gtkrc then GTK+ looks +for ~/.gtkrc.ja_JP and ~/.gtkrc.ja, +and parses the first of those that exists. @@ -130,7 +127,14 @@ The possible toplevel declarations are: include filename - Parses another file at this point. + Parses another file at this point. If + filename is not an absolute filename, + it is searched in the directories of the currently open RC files. + + GTK+ also tries to load a + locale-specific variant of + the included file. + @@ -254,7 +258,9 @@ elements are: font = font - Sets the font for a widget. + Sets the font for a widget. font must be + a XLFD font description, e.g. + "-*-helvetica-medium-r-normal--10-*-*-*-*-*-*-*". @@ -263,10 +269,26 @@ elements are: Sets the fontset for a widget. Overrides any - font declarations. + font declarations. font + must be a comma-separated list of XLFD font descriptions, e.g. + "-JIS-Fixed-Medium-R-Normal--26-180-100-100-C-240, + -JIS-Fixed-Medium-R-Normal--26-180-100-100-C-120, + -GB-Fixed-Medium-R-Normal--26-180-100-100-C-240, + -Adobe-Courier-Bold-R-Normal--25-180-100-100-M-150". + + font_name = font + + + Sets the font for a widget. Overrides any + font or fontset declarations. + font must be a Pango font name, e.g. + "Sans Italic 10". + + + stock["stock-id"] = { icon source specifications } @@ -275,6 +297,15 @@ elements are: + + engine "engine" { engine-specific +settings } + + + Defines the engine to be used when drawing with this style. + + + @@ -336,7 +367,7 @@ state of the widget. The states are: - + Colors can be specified as a string containing a color name (GTK+ knows all names from the X color database /usr/lib/X11/rgb.txt), @@ -656,7 +687,8 @@ statement in a RC file. Parses a given resource file. -@filename: the filename of a file to parse. +@filename: the filename of a file to parse. If @filename is not absolute, it + is searched in the current directory. diff --git a/gtk/gtkrc.c b/gtk/gtkrc.c index dabbfa041f..b9a2fe7b91 100644 --- a/gtk/gtkrc.c +++ b/gtk/gtkrc.c @@ -456,7 +456,8 @@ gtk_rc_add_initial_default_files (void) /** * gtk_rc_add_default_file: - * @filename: the pathname to the file. + * @filename: the pathname to the file. If @filename is not absolute, it + * is searched in the current directory. * * Adds a file to the list of files to be parsed at the * end of gtk_init(). @@ -808,11 +809,7 @@ gtk_rc_parse_file (GtkRcContext *context, if (strcmp (locale, "C") && strcmp (locale, "POSIX")) { - /* Determine locale-specific suffixes for RC files - * - * We normalize the charset into a standard form, - * which has all '-' and '_' characters removed, - * and is lowercase. + /* Determine locale-specific suffixes for RC files. */ length = strlen (locale); -- 2.30.2